#ifndef SK_GAME_PROJECT_H
#define SK_GAME_PROJECT_H

#include <QString>
#include <QVector>

#include "sk_game_level.h"

class QDomElement;
class QDomDocument;

namespace sk
{

    class GameProject
    {
    public:

        GameProject();
        bool isEmpty() const;
        bool isDirty() const;
        void setDirty(bool d);
        void removeLevel(int ind);
        void swapLevels(int i, int j);
        bool create(QString path);
        bool open(QString path);
        void close(bool save);
        bool saveToDisk();
        QString path() const;
        QString name() const;
        QString projectDir() const;
        void cloneLevel(int ind);
        void createLevel(QString name);
        QVector<sk::GameLevel> levels;        
        void serialize(QDomDocument * doc, QDomElement * e);
        bool deserialize(QDomElement * e);
        QString errorString;
    private:
        bool _isEmpty;
        bool _isDirty;        

        QString _name;
        QString _projectDir;
    };

} // namespace sk

#endif // SK_GAME_PROJECT_H
